<html>
    <head>
        <title>Welcome to Kogukond!</title>
        <%= stylesheet_link_tag 'kogukond', 'scaffold' %>
    </head>
    <body>
        <table>
            <tr>
              <td id="banner" colspan="2" align=center><%= @page_title || "Kogukond Banner Title" %></td>
            </tr>
            <tr>
              <td id="flash" colspan="2" align=center><%= @flash[:notice] %></td>
            </tr>

            <tr>
            <td valign=TOP><BR>
                <% if session[:user_id] -%>
                    <%= link_to 'List Nodes',       :controller => "nodes",
                                                    :action => 'list' %><BR>
                    <%= link_to 'List Edges',       :controller => "edges",
                                                    :action => 'list' %><BR>
                    <%= link_to 'List Groups',      :controller => "groups",
                                                    :action => 'list' %><BR>

                    <% if session[:user_role] == 'Admin' || session[:user_role] == 'Super Admin' %>
                        <%= link_to 'List Users',       :controller => "users",
                                                        :action => 'list' %><BR>
                    <% end -%>

                    <% if session[:user_role] == 'Super Admin' %>
                        <%= link_to 'List Communities', :controller => "communities",
                                                        :action => 'list' %>
                    <% end -%>
                    <BR><BR>

                    <%= link_to 'Query Map', :controller => 'kogukond',
                                                 :action => 'queryMap' %><BR>
                    <BR><BR>

                    <%= link_to 'Radial Graph:80',     'http://localhost/kogukond/drawRG.html' %><BR>
                    <%= link_to 'Simple Graph:80',     'http://localhost/kogukond/drawSG.html' %><BR>
                    <%= link_to 'Log Out',          :controller => "login",
                                                    :action => 'logout' %><BR><BR>

                    Community:  <%= session[:community_name] %><BR>
                    Logon User: <%= session[:user_name] %><BR>
                    Role:       <%= session[:user_role] %>
                <% end -%>
                <td valign=TOP align=left>
                    <%= @content_for_layout %>
               </td>
            </tr>
        </table>
    </body>
</html>
